from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from django.conf import settings

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    
    # Login / Logout
    url(r'^accounts/login', 'django.contrib.auth.views.login'),
    url(r'^logout/', 'django.contrib.auth.views.logout', {'next_page': '/accounts/login/'}),
    
    url(r'^venda/', include('venda.urls')),
    url(r'^estoque/', include('estoque.urls')),
    url(r'^financeiro/', include('financeiro.urls')),
    
    url(r'licenca/', include('licenca.urls')),
    
    url(r'^sobre/$', 'ctrlsys_comercial.views.sobre'),
    url(r'^ajuda/$', 'ctrlsys_comercial.views.ajuda'),
    
    url(r'^contatos/$', 'ctrlsys_comercial.views.contatos'),
    
    url(r'^$', 'ctrlsys_comercial.views.home'),
    url(r'^usuarios/$', 'ctrlsys_comercial.views.usuarios'),
    
    url(r'^media/(.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT}),
)
